import BaseService, { buildPaginationQueryOpts } from '../base.service'

class ${classInfo.className}Service extends BaseService {
    constructor() {
        super('/${moduleName}/api/${classInfo.className?uncap_first}')
    }

}

export default new ${classInfo.className}Service()



export const searchOptions = {
    simpleSearchOptions: [
        {
            name: 'ID',
            key: 'id',
            meta: {
                value: '',
                component: 'InputNumber',
                size: 'small',
                operator: '=',
                type: 'number',
            },
        },
        {
            name: '创建时间',
            key: 'createdDate',
            meta: {
                value: '',
                component: 'RangePicker',
                size: 'small',
                // operation: this.searchById,
                operator: 'between',
                type: 'moment',
            },
        },

    ],
    advancedSearchOptions: {

        list: [
            {
                name: 'ID',
                key: 'id',
                meta: {
                    value: '',
                    component: 'InputNumber',
                    size: 'small',
                },
            },

            {
                name: '创建时间',
                key: 'createdDate',
                meta: {
                    value: '',
                    component: 'RangePicker',
                    size: 'small',
                    operator: 'between',
                    type: 'moment',
                },
            },
        ],
    },
}

export const columns = [
    <#list classInfo.fieldList as fieldItem >
    {
        title: '${fieldItem.fieldLabel}',
        dataIndex: '${fieldItem.fieldName}',
        key: '${fieldItem.fieldName}',
        width: 120,
        ellipsis: true,

    },
    </#list>
    {
        title: '操作',
        key: 'operation',
        slots: { customRender: 'operation' },
        fixed: 'right',
        width: 110,
        meta: {
            hideInEditForm: true,
        },
    },
]
